// Header File
// Created 11/19/2007; 5:54:33 PM

#ifndef __TECHNOLOGY_H__
#define __TECHNOLOGY_H__

// Defines number of technologies
#define TECH_NUMBER 90

// Technology Structure
typedef struct
{
	char name[25];
	char aiValue;
	
	char preq1, preq2;
	char epoch;
} Technology;

Technology techs[TECH_NUMBER];

#ifndef INSTALL

////////////////////////////
// Technology Methods //////
////////////////////////////
char TechWindow(char civ);
void UpdateTechnology(char civ);

#else

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CreateTech /////////////////////////////////////////////////////////////////////////////////////////////////////
// Creates one technology /////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CreateTech(char i, char *name, char aiValue, char modifier, char preq1, char preq2, char epoch, char category)
{
	strcpy(techs[i].name, name);
	techs[i].aiValue = aiValue;
	techs[i].preq1 = preq1;
	techs[i].preq2 = preq2;
	techs[i].epoch = epoch;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CreateTechnology ///////////////////////////////////////////////////////////////////////////////////////////////
// Creates all the technologies ///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CreateTechnology()
{
	CreateTech(0, "Advanced Flight",     4,-2,  66, 44, 3, 4);
	CreateTech(1, "Alphabet",            5, 1,  -1, -1, 0, 3);
	CreateTech(2, "Amphibious Warfare",  3,-2,  57, 81, 3, 0);
	CreateTech(3, "Astronomy",           4, 1,  56, 49, 1, 3);
	CreateTech(4, "Atomic Theory",       4,-1,  83, 61, 2, 3);
	CreateTech(5, "Automobile",          6,-1,  14, 79, 3, 4);
	CreateTech(6, "Banking",             4, 1,  84, 71, 1, 1);
	CreateTech(7, "Bridge Building",     4, 0,  39, 18, 0, 4);
	CreateTech(8, "Bronze Working",      6,-1,  -1, -1, 0, 4);
	CreateTech(9, "Ceremonial Burial",   5, 0,  -1, -1, 0, 2);
	CreateTech(10, "Chemistry",          5,-1,  85, 50, 1, 3);
	CreateTech(11, "Chivalry",           4,-2,  29, 36, 1, 0);
	CreateTech(12, "Code of Laws",       4, 1,   1, -1, 0, 2);
	CreateTech(13, "Combined Arms",      5,-1,  53,  0, 3, 0);
	CreateTech(14, "Combustion",         5,-1,  69, 28, 2, 4);
	CreateTech(15, "Communism",          5, 0,  60, 37, 2, 2);
	CreateTech(16, "Computers",          4, 1,  52, 48, 3, 4);
	CreateTech(17, "Conscription",       7,-1,  21, 51, 2, 0);
	CreateTech(18, "Construction",       4, 0,  47, 20, 0, 4);
	CreateTech(19, "The Corporation",    4, 0,  37, 22, 2, 1);
	CreateTech(20, "Currency",           4, 1,   8, -1, 0, 1);
	CreateTech(21, "Democracy",          5, 1,   6, 38, 2, 2);
	CreateTech(22, "Economics",          4, 1,  85,  6, 2, 1);
	CreateTech(23, "Electricity",        4, 0,  51, 45, 2, 4);
	CreateTech(24, "Electronics",        4, 1,  23, 19, 3, 4);
	CreateTech(25, "Engineering",        4, 0,  87, 18, 0, 4);
	CreateTech(26, "Environmentalism",   3, 1,  68, 76, 3, 2);
	CreateTech(27, "Espionage",          2,-1,  15, 21, 3, 0);
	CreateTech(28, "Explosives",         5, 0,  35, 10, 2, 4);
	CreateTech(29, "Feudalism",          4,-1,  86, 54, 0, 0);
	CreateTech(30, "Flight",             4,-1,  14, 83, 2, 4);
	CreateTech(31, "Fundamentalism",     3,-2,  55, 17, 2, 2);
	CreateTech(32, "Fusion Power",       3, 0,  59, 80, 3, 3);
	CreateTech(33, "Genetics",           3, 2,  50, 19, 3, 3);
	CreateTech(34, "Guerrilla Warfare",  4, 1,  15, 81, 3, 0);
	CreateTech(35, "Gunpowder",          8,-2,  38, 39, 1, 0);
	CreateTech(36, "Horseback Riding",   4,-1,  -1, -1, 0, 0);
	CreateTech(37, "Industrialization",  6, 0,  67,  6, 2, 1);
	CreateTech(38, "Invention",          6, 0,  25, 43, 1, 4);
	CreateTech(39, "Iron Working",       5,-1,   8, 86, 0, 4);
	CreateTech(40, "Labor Union",        4,-1,  48, 34, 3, 2);
	CreateTech(41, "The Laser",          4, 0,  59, 48, 3, 3);
	CreateTech(42, "Leadership",         5,-1,  11, 35, 1, 0);
	CreateTech(43, "Literacy",           5, 2,  88, 12, 0, 3);
	CreateTech(44, "Machine Tools",      4,-2,  79, 81, 2, 4);
	CreateTech(45, "Magnetism",          4,-1,  61, 39, 1, 3);
	CreateTech(46, "Map Making",         6,-1,   1, -1, 0, 1);
	CreateTech(47, "Masonry",            4, 1,  -1, -1, 0, 4);
	CreateTech(48, "Mass Production",    5, 0,   5, 19, 3, 4);
	CreateTech(49, "Mathematics",        4,-1,   1, 47, 0, 3);
	CreateTech(50, "Medicine",           4, 0,  60, 84, 1, 1);
	CreateTech(51, "Metallurgy",         6,-2,  35, 85, 1, 0);
	CreateTech(52, "Miniaturization",    4, 1,  44, 24, 3, 4);
	CreateTech(53, "Mobile Warfare",     8,-1,   5, 81, 3, 0);
	CreateTech(54, "Monarchy",           5, 1,   9, 12, 0, 2);
	CreateTech(55, "Monotheism",         5, 1,  60, 64, 1, 2);
	CreateTech(56, "Mysticism",          4, 0,   9, -1, 0, 2);
	CreateTech(57, "Navigation",         6,-1,  75,  3, 1, 1);
	CreateTech(58, "Nuclear Fission",    6,-2,   4, 48, 3, 3);
	CreateTech(59, "Nuclear Power",      3, 0,  58, 24, 3, 3);
	CreateTech(60, "Physics",            4,-1,  57, 43, 1, 3);
	CreateTech(62, "Plastics",           4, 1,  69, 76, 3, 4);
	//63, Plumbing,           4, 0,  no,  no,  1, 4    ; Plu  (Cst & Pot)
	CreateTech(64, "Polytheism",         4, 0,   9, 36, 0, 2);
	CreateTech(65, "Pottery",            4, 1,  -1, -1, 0, 1);
	CreateTech(66, "Radio",              5,-1,  30, 23, 3, 4);
	CreateTech(67, "Railroad",           6, 0,  78, 7,  2, 1);
	CreateTech(68, "Recycling",          2, 1,  48, 21, 3, 2);
	CreateTech(69, "Refining",           4, 0,  10, 19, 2, 4);
	CreateTech(70, "Refrigeration",      3, 1,  23, 74, 3, 1);
	CreateTech(71, "The Republic",       5, 1,  12, 43, 0, 2);
	CreateTech(72, "Robotics",           5,-2,  16, 53, 3, 0);
	CreateTech(73, "Rocketry",           6,-2,   0, 24, 3, 0);
	CreateTech(74, "Sanitation",         4, 2,  50, 25, 2, 1);
	CreateTech(75, "Seafaring",          4, 1,  46, 65, 0, 1);
	CreateTech(76, "Space Flight",       4, 1,  16, 73, 3, 3);
	CreateTech(77, "Stealth",            3,-2,  80, 72, 3, 0);
	CreateTech(78, "Steam Engine",       4,-1,  61, 38, 2, 3);
	CreateTech(79, "Steel",              4,-1,  23, 37, 2, 4);
	CreateTech(80, "Superconductor",     4, 1,  62, 41, 3, 3);
	CreateTech(81, "Tactics",            6,-1,  17, 42, 2, 0);
	CreateTech(82, "Theology",           3, 2,  55, 29, 1, 2);
	CreateTech(83, "Theory of Gravity",  4, 0,   3, 85, 1, 3);
	CreateTech(84, "Trade",              4, 2,  20, 12, 0, 1);
	CreateTech(85, "University",         5, 1,  49, 60, 1, 3);
	CreateTech(86, "Warrior Code",       4,-1,  -1, -1, 0, 0);
	CreateTech(87, "The Wheel",          4,-1,  36, -1, 0, 4);
	CreateTech(88, "Writing",            4, 2,   1, -1, 0, 3);
	CreateTech(89, "Future Technology",  1, 0,  32, 68, 3, 3);
}

#endif // !INSTALL

#endif
